<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>iTaC-QoS {% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{{base_url}}media/size.css" type="text/css" />
    <link rel="stylesheet" href="{{base_url}}media/style.css" type="text/css" />
   </head>
  <body>
  <div id="site">
    <div id="header">
      <div id="userAuthentication">
	<div class="left">
	  Welcome {% if user %}<a href="{{base_url}}controlPanel"
	  title="Go to your control panel">{{ user.username }}</a>{% endif %}
	</div>
	<div class="right">
	  {% if user %}
	  <a href="{{base_url}}logout/">Log out</a>
	  {% else %}
	  <form id="loginForm" method="POST" action="{{base_url}}login/">
	  <input type="text" name="login" />
	  <input type="password" name="password" />
	  <input type="submit" value="Sign in"/>
	  </form>
	  <a href="{{base_url}}signup/">Sign up</a>
	  {% endif %}
	</div>
      </div>
      <a href="{{base_url}}"><h1>iTaC-QoS - demo</h1></a>
    </div>

    <div id="main">
    <div id="menu">
      <h2>Menu</h2>
      <h3>Search</h3>
      <form id="search">
      <input type="text" name="query" />
      <input type="button" value="search"/>
      </form>
      <a href="{{base_url}}search/">Advanced search</a>
      <h3>Categories</h3>
      <ul>
	{% for cat, nbServices in menuCategories.items %}
	<li><a href="{{base_url}}services/cat/{{cat.slug}}/"
             title="View web services of the {{cat.name|lower}} category">
	     {{cat.name}}</a>
	({{nbServices}} service{{nbServices|pluralize}})</li>
	{% endfor %}
      </ul>
      <h3>Keywords</h3>
      <ul>
	{% for kw, nbServices in menuKeywords.items %}
	<li><a href="{{base_url}}services/keyword/{{kw.slug}}/" title="View web services tagged with {{kw.name|lower}}">{{kw.name}}</a>
	({{nbServices}} service{{nbServices|pluralize}})</li>
	{% endfor %}
      </ul>
    </div>

    <div id="content">
      {% block content %}{% endblock %}
    </div>
    </div>
    
    <div id="footer">
      <span class="leftSpan">
	Powered by <a href="#">iTaC-QoS</a>
      </span>
      <span class="centerSpan">
	<a href="" title="Check XHTML validity">xHTML</a> /
	<a href="" title="Check CSS validity">CSS</a>
      </span>
      <span class="rightSpan">
	<a href="{{base_url}}help/">Help</a>
      </span>
    </div>
  </div>
  </body>
</html>